package com.demo.test;

import com.demo.dao.UserDao;
import com.demo.factory.MyClassPathXmlApplicationContext;
import com.demo.service.UserService;

public class BeanDemo {
    public static void main(String[] args) {
        MyClassPathXmlApplicationContext context = new MyClassPathXmlApplicationContext("spring.xml");
        UserDao userDao = (UserDao) context.myGetBean("userDao");
        UserService userService = (UserService) context.myGetBean("userService");
        userDao.testDao();
        userService.testService();

    }
}
